/*
 * graph.h
 *
 *  Created on: 31-10-2012
 *      Author: jerzy
 */

#ifndef GRAPH_H_
#define GRAPH_H_

typedef short int bool;
enum gphtype{graph = 0, digraph = 1};
typedef struct {int v; int w;} edge;
struct gphadm {int V; int E; int **adj;};
typedef struct gphadm *gphadm;

edge edgein(int , int );
int graph_read(char *, edge *);
int graph_out(char *, char *, enum gphtype , int , int , edge *);

void admshow(gphadm );
void gphadmdel(gphadm );
int gphadmeds(edge *, gphadm, enum gphtype );
void gphadmins(gphadm , edge, enum gphtype );
gphadm gphadmrand(int , int, enum gphtype );
void gphadmrem(gphadm , edge, enum gphtype );
void gphadmshow(gphadm, enum gphtype );
gphadm itgphadm(int );

#endif /* GRAPH_H_ */
